A technology described in, for example, PTL 1 has been conventionally disclosed to improve the reliability of the function of detecting motor rotation angle information. This technology includes two systems of a magnetic detection element and a dedicated magnetic detection element as a magnetic sensor and uses a control unit to compare pieces of angle information obtained therefrom, compare pieces of rotation angle information calculated based on angle signals, or compare pieces of steering position information calculated based on pieces of angle information, between these two systems, to diagnose the accuracy of the output of each magnetic detection element.